package com.zuoye;

public class Teacher {
    private  String name;
    private int num;
public Teacher(){

}
    public void setName(String name) {
        this.name = name;

    }
    public void setNum(int num) {
        this.num = num;
    }
    public Teacher(String name,int num){
        this.name = name;
        this.num = num;
    }
    public void teach(){
        System.out.println("工号为"+num+"的"+name+"老师正在讲课");
    }
}
 class TestTeacher1 {
    public static void main(String[] args) {
        Teacher tea =new Teacher();
        tea.setName("铁头");
        tea.setNum(77);
        tea.teach();

        Teacher tea1=new Teacher("铁头",77);
        tea1.teach();
    }
}
